package cn.pilipa.accounting.common;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Valid
@EqualsAndHashCode
/**
 * 操作人.
 */
public class Operator {

  @JsonIgnore
  private final LocalDateTime when = LocalDateTime.now();

  /**
   * 操作人id.
   */
  @NotBlank(message = "操作人id不能为空")
  private String id;

  /**
   * 操作人姓名.
   */
  @NotBlank(message = "操作人姓名不能为空")
  private String name;
}
